package com.norma.macaron.service.common.domain.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.*;



@Entity
@Table(name = "t_user")
@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
public class TUser implements Serializable,Cloneable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "id", type = IdType.AUTO)
    private long id;

    @Column(name = "address")
    private String address;

    // 信用卡管家的激活状态: 0 未激活,1已激活
    @Column(name = "bank_card_manager_status")
    private int bankCardManagerStatus;

    @Column(name = "birthday")
    private Date birthday;

    /**标记老用户是否发过返利（老用户在新系统消费满1000，他和他的上级会得到一笔钱）*/
    @Column(name = "old_user_rebate_flag")
    private String oldUserRebateFlag;

    /**
     * 所属品牌
     */
    @Column(name = "brand_id")
    private long brandId;

    @Column(name = "brand_name")
    private String brandName;

    @Column(name = "cityid")
    private Integer cityId;

    /**
     * 联系人
     */
    @Column(name = "contactname")
    private String contactname;

    @Column(name = "countyid")
    private Integer countyId;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "email")
    private String email;

    @Column(name = "encourage_num")
    private int encourageNum;// 抽奖次数

    /**
     * 全称
     */
    @Column(name = "fullname")
    private String fullname;

    /**
     * 用户等级 三级分销 3是最高级 2是中级 1是低级 0不具备三级分销等级的
     */
    @Column(name = "grade")
    private String grade;

    /**
     * 邀请码
     */
    @Column(name = "invite_code")
    private String inviteCode;

    @Column(name = "nick_name")
    private String nickName;

    @Column(name = "openid")
    private String openid;// 微信中针对一个公众号的用户唯一标志，公众号获取和微信登录获取不一样

    /**小程序openId*/
    @Column(name = "miniopenid")
    private String miniOpenId;

    /**小程序unionId*/
    @Column(name = "miniunionid")
    private String miniUnionId;
    /**
     * 组织机构码
     */
    @Column(name = "origcode")
    private String origcode;

    @Column(name = "password")
    private String password;

    @Column(name = "pay_password")
    private String payPassword;

    @Column(name = "phone")
    private String phone;

    @Column(name = "pre_user_id")
    private Long preUserId;

    @Column(name = "pre_user_phone")
    private String preUserPhone;

    @Column(name = "profession")
    private String profession;

    @Column(name = "provinceid")
    private Integer provinceId;

    /**
     * 0表示审核中 1表示审核通过 2表示审核拒绝  3表示未提交审核资料
     */
    @Column(name = "real_name_status")
    private String realNameStatus;

    @Column(name = "remarks")
    private String remarks;

    @Column(name = "sex")
    private String sex;

    /**
     * 0表示审核中 1表示审核通过 2表示审核拒绝 3表示未提交
     */
    @Column(name = "shops_status")
    private String shopsStatus;

    @Column(name = "signcode")
    private String signcode;

    @Column(name = "unionid")
    private String unionid;// 微信中各处针对用户唯一标志，公众号获取和微信登录获取一样的

    @Column(name = "user_head_url")
    private String userHeadUrl;

    @Column(name = "valid_status")
    private int validStatus;

    @Column(name = "vdynast_type")
    private String vdynastType;

    @Column(name = "verify_status")
    private String verifyStatus;

    @Column(name = "source")
    private String source;

    private String zipcode;
    @Column(name = "third_level_id")
    private Integer thirdLevelId;
    /**
     * 等级层次id
     */
    @Column(name = "grade_floor_id")
    private Integer gradeFloorId;

    @Column(name = "update_grade_time")
    private Date updateGradeTime;
    @Transient
    private String cityName;
    @Column(name = "transfer_remark")
    private  String transferRemark;
    @Column(name = "old_userid")
    private  Integer oldUserid;
    @Column(name = "pre_old_userid")
    private  Integer preOldUserid;
    @Column(name = "is_transfer")
    private  String isTransfer;
    @Column(name = "article_id")
    private  Long  articleId;
    @Column(name = "realname_time")
    private Date realnameTime;

    /**
     * 查询用存储等级
     */
    @Transient
    private String level;

    /**下级id*/
    @Transient
    private long subordinateId;
    @Transient
    private BigDecimal Amount;

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public TUser(Long articleId) {
        this.articleId = articleId;
    }

    public TUser(int id, String fullName) {
        this.id = id;
        this.fullname = fullName;
    }

    public TUser(int id, String fullName, int brandId) {
        this.id = id;
        this.fullname = fullName;
        this.brandId = brandId;
    }

    public TUser() {
    }

    public TUser(String phone, String password) {
        this.password = password;
        this.phone = phone;
    }

    public String getTransferRemark() {
        return transferRemark;
    }

    public void setTransferRemark(String transferRemark) {
        this.transferRemark = transferRemark;
    }

    public Integer getOldUserid() {
        return oldUserid;
    }

    public void setOldUserid(Integer oldUserid) {
        this.oldUserid = oldUserid;
    }

    public Integer getPreOldUserid() {
        return preOldUserid;
    }

    public void setPreOldUserid(Integer preOldUserid) {
        this.preOldUserid = preOldUserid;
    }

    public String getIsTransfer() {
        return isTransfer;
    }

    public void setIsTransfer(String isTransfer) {
        this.isTransfer = isTransfer;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Date getUpdateGradeTime() {
        return updateGradeTime;
    }

    public void setUpdateGradeTime(Date updateGradeTime) {
        this.updateGradeTime = updateGradeTime;
    }

    public void setBrandId(long brandId) {
        this.brandId = brandId;
    }

    public Integer getGradeFloorId() {
        return gradeFloorId;
    }

    public void setGradeFloorId(Integer gradeFloorId) {
        this.gradeFloorId = gradeFloorId;
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAddress() {
        return this.address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getBankCardManagerStatus() {
        return this.bankCardManagerStatus;
    }

    public void setBankCardManagerStatus(int bankCardManagerStatus) {
        this.bankCardManagerStatus = bankCardManagerStatus;
    }

    public Date getBirthday() {
        return this.birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Long getBrandId() {
        return this.brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public String getBrandName() {
        return this.brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getContactname() {
        return this.contactname;
    }

    public void setContactname(String contactname) {
        this.contactname = contactname;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getEncourageNum() {
        return this.encourageNum;
    }

    public void setEncourageNum(int encourageNum) {
        this.encourageNum = encourageNum;
    }

    public String getFullname() {
        return this.fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getGrade() {
        return this.grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getInviteCode() {
        return this.inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public String getNickName() {
        return this.nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getOpenid() {
        return this.openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOrigcode() {
        return this.origcode;
    }

    public void setOrigcode(String origcode) {
        this.origcode = origcode;
    }

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPayPassword() {
        return this.payPassword;
    }

    public void setPayPassword(String payPassword) {
        this.payPassword = payPassword;
    }

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getPreUserId() {
        return this.preUserId;
    }

    public void setPreUserId(Long preUserId) {
        this.preUserId = preUserId;
    }

    public String getPreUserPhone() {
        return this.preUserPhone;
    }

    public void setPreUserPhone(String preUserPhone) {
        this.preUserPhone = preUserPhone;
    }

    public String getProfession() {
        return this.profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public String getRealNameStatus() {
        return this.realNameStatus;
    }

    public void setRealNameStatus(String realNameStatus) {
        this.realNameStatus = realNameStatus;
    }

    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getSex() {
        return this.sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getShopsStatus() {
        return this.shopsStatus;
    }

    public void setShopsStatus(String shopsStatus) {
        this.shopsStatus = shopsStatus;
    }

    public String getSigncode() {
        return this.signcode;
    }

    public void setSigncode(String signcode) {
        this.signcode = signcode;
    }

    public String getUnionid() {
        return this.unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public String getUserHeadUrl() {
        return this.userHeadUrl;
    }

    public void setUserHeadUrl(String userHeadUrl) {
        this.userHeadUrl = userHeadUrl;
    }

    public int getValidStatus() {
        return this.validStatus;
    }

    public void setValidStatus(int validStatus) {
        this.validStatus = validStatus;
    }

    public String getVdynastType() {
        return this.vdynastType;
    }

    public void setVdynastType(String vdynastType) {
        this.vdynastType = vdynastType;
    }

    public String getVerifyStatus() {
        return this.verifyStatus;
    }

    public void setVerifyStatus(String verifyStatus) {
        this.verifyStatus = verifyStatus;
    }

    public String getZipcode() {
        return this.zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    public Integer getThirdLevelId() {
        return thirdLevelId;
    }

    public void setThirdLevelId(Integer thirdLevelId) {
        this.thirdLevelId = thirdLevelId;
    }

    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    public Integer getCountyId() {
        return countyId;
    }

    public void setCountyId(Integer countyId) {
        this.countyId = countyId;
    }

    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    public String getMiniOpenId() {
        return miniOpenId;
    }

    public void setMiniOpenId(String miniOpenId) {
        this.miniOpenId = miniOpenId;
    }

    public String getMiniUnionId() {
        return miniUnionId;
    }

    public void setMiniUnionId(String miniUnionId) {
        this.miniUnionId = miniUnionId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public long getSubordinateId() {
        return subordinateId;
    }

    public void setSubordinateId(long subordinateId) {
        this.subordinateId = subordinateId;
    }

    public String getOldUserRebateFlag() {
        return oldUserRebateFlag;
    }

    public void setOldUserRebateFlag(String oldUserRebateFlag) {
        this.oldUserRebateFlag = oldUserRebateFlag;
    }

    public Date getRealnameTime() {
        return realnameTime;
    }

    public void setRealnameTime(Date realnameTime) {
        this.realnameTime = realnameTime;
    }
    @Override
    public Object clone() throws CloneNotSupportedException
    {
        Object object = super.clone();
        return object;
    }

    @Override
    public String toString() {
        return "TUser{" +
                "id=" + id +
                ", address='" + address + '\'' +
                ", bankCardManagerStatus=" + bankCardManagerStatus +
                ", birthday=" + birthday +
                ", oldUserRebateFlag='" + oldUserRebateFlag + '\'' +
                ", brandId=" + brandId +
                ", brandName='" + brandName + '\'' +
                ", cityId=" + cityId +
                ", contactname='" + contactname + '\'' +
                ", countyId=" + countyId +
                ", createTime=" + createTime +
                ", email='" + email + '\'' +
                ", encourageNum=" + encourageNum +
                ", fullname='" + fullname + '\'' +
                ", grade='" + grade + '\'' +
                ", inviteCode='" + inviteCode + '\'' +
                ", nickName='" + nickName + '\'' +
                ", openid='" + openid + '\'' +
                ", miniOpenId='" + miniOpenId + '\'' +
                ", miniUnionId='" + miniUnionId + '\'' +
                ", origcode='" + origcode + '\'' +
                ", password='" + password + '\'' +
                ", payPassword='" + payPassword + '\'' +
                ", phone='" + phone + '\'' +
                ", preUserId=" + preUserId +
                ", preUserPhone='" + preUserPhone + '\'' +
                ", profession='" + profession + '\'' +
                ", provinceId=" + provinceId +
                ", realNameStatus='" + realNameStatus + '\'' +
                ", remarks='" + remarks + '\'' +
                ", sex='" + sex + '\'' +
                ", shopsStatus='" + shopsStatus + '\'' +
                ", signcode='" + signcode + '\'' +
                ", unionid='" + unionid + '\'' +
                ", userHeadUrl='" + userHeadUrl + '\'' +
                ", validStatus=" + validStatus +
                ", vdynastType='" + vdynastType + '\'' +
                ", verifyStatus='" + verifyStatus + '\'' +
                ", source='" + source + '\'' +
                ", zipcode='" + zipcode + '\'' +
                ", thirdLevelId=" + thirdLevelId +
                ", gradeFloorId=" + gradeFloorId +
                ", updateGradeTime=" + updateGradeTime +
                ", cityName='" + cityName + '\'' +
                ", transferRemark='" + transferRemark + '\'' +
                ", oldUserid=" + oldUserid +
                ", preOldUserid=" + preOldUserid +
                ", isTransfer='" + isTransfer + '\'' +
                ", articleId=" + articleId +
                ", realnameTime=" + realnameTime +
                ", level='" + level + '\'' +
                ", subordinateId=" + subordinateId +
                ", Amount=" + Amount +
                '}';
    }
}